<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="/WEB-INF/template/basicTemplate.xhtml">
<ui:define name="content">
	<h:inputHidden rendered="#{menuController.userRank != 1}" value="#{menuController.redirect()}"></h:inputHidden>
	<h:inputHidden rendered="#{menuController.userRank == 1}">
	<!--  TO DO: css and validators. Don't forget to make bottom border for cells! -->
	<h:panelGrid columns="2">
		<h:outputText value="Name"></h:outputText>
		<h:outputText value="#{viewCandidatesBean.candidate.name}"></h:outputText>
		<h:outputText value="Email"></h:outputText>
		<h:outputText value="#{viewCandidatesBean.candidate.email}"></h:outputText>		
	</h:panelGrid>
	<br></br>

		<h:dataTable rendered="#{not empty viewCandidatesBean.intervShowCandidate}" value="#{viewCandidatesBean.intervShowCandidate}" var="test" border="0">
			<h:column >
			<f:facet name="header">
    				Test Title
    			</f:facet>
    			<h:outputText value="#{test.template.title}"></h:outputText>
			  
			</h:column>
			<h:column  >
			<f:facet name="header">
    				Test Score
    			</f:facet>
    			<div align="center"><h:outputText value="#{test.score}"></h:outputText></div>
			  
			</h:column>
		</h:dataTable>
	<h:form>
	<h:commandButton value="Back" styleClass="button" action="testerhome.xhtml"></h:commandButton>
	</h:form>
	</h:inputHidden>
	</ui:define>
</ui:composition>
</html>